package com.power.sifa.approve.api;

import com.plf.common.domain.ResponseDTO;
import com.power.sifa.approve.model.Apl_archive;
import com.power.sifa.approve.model.pageInfo.Apl_archivePageInfo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 *  归档记录 Feign
 */
public interface IApl_archiveFeign {

    /**
     * 归档记录分页列表
     */
    @PostMapping("/apl_archive/list")
    ResponseDTO list(@RequestBody Apl_archivePageInfo apl_archivePageInfo);

    /**
    * 查看归档记录
    */
    @GetMapping("/apl_archive/view")
    ResponseDTO view(@RequestParam("id") String id);

    /**
    * 删除归档记录
    */
    @PostMapping("/apl_archive/delete")
    ResponseDTO delete(@RequestParam("id") String id);

    ///**
    // * 查看归档记录 复合主键使用
    // */
    //@PostMapping("/apl_archive/viewByPK")
    //ResponseDTO viewByPK(@RequestBody Apl_archive.Apl_archivePK pk);

    /**
     * 修改或保存归档记录
     */
    @PostMapping("/apl_archive/save")
    ResponseDTO save(@RequestBody Apl_archive apl_archive);

    ///**
    // * 删除归档记录 复合主键使用
    // */
    //@PostMapping("/apl_archive/deleteByPK")
    //ResponseDTO deleteByPK(@RequestBody Apl_archive.Apl_archivePK pk);
    
    /**
     * 批量删除归档记录
     */
    @PostMapping("/apl_archive/batchDel")
    ResponseDTO batchDel(@RequestParam("ids") String ids);
    
     /**
     * 导出excel
     */
    @PostMapping("/apl_archive/output")
    void output(HttpServletResponse response, @RequestBody Apl_archivePageInfo apl_archivePageInfo);
        
     /**
     * 导出excel模板
     */
    @PostMapping("/apl_archive/exportExcelTemplate")
    void exportExcelTemplate(HttpServletResponse response);
    
     /**
     *	导入excel
     */
    @PostMapping("/apl_archive/importExcel")
    ResponseDTO importExcel(@RequestBody MultipartFile file) throws IOException ;

    /**
     * 通过applyid查询归档数据
     * @param applyid
     * @return
     */
    @PostMapping("/apl_archive/getArchiveByApplyid")
    ResponseDTO getArchiveByApplyid(@RequestParam("applyid") String applyid);
    
}
